<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <jsp:include page="/static/common/common.jsp"></jsp:include>
    <script type="text/javascript" src="/static/js/newCase.js"></script>
</head>
<body>
<%--此处必须设计为双标签,否则不能作为容器储存数据--%>
<table id="emp_grid"></table>
<div id="tb">
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add'" onclick="add()">新增</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-edit'" onclick="edit()">编辑</a>
    <a href="#" id="changeState_btn" class="easyui-linkbutton" iconCls="icon-remove" onclick="changeState()">审核</a>
    <a href="#" class="easyui-linkbutton" iconCls="icon-reload" onclick="reload()">刷新</a>
    <%--在easyUI中文本框的格式为textboxchangeState--%>
    <%--设置提示内容的属性为prompt--%>
    <input class="easyui-textbox" name="keyword" prompt="车牌/品牌/报案人">
    <a href="#" class="easyui-linkbutton" iconCls="icon-search" onclick="query()">搜索</a>
</div>
<div id="form_btn">
    <a href="#" class="easyui-linkbutton" iconCls="icon-save" onclick="save()">保存</a>
    <a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="cancel()">取消</a>
</div>

<%--新增,编辑 弹窗--%>
<div id="emp_dialog">
    <%--切记提交表单的方式--%>
    <form id="emp_form" method="post" data-url="/newCase/saveOrUpdate.do">
        <input type="hidden" id="id" name="id"/>
        <table align="center" style="margin-top: 15px">

            <tr>
                <td>用户名:</td>
                <td>
                    <input name="name" class="easyui-textbox"
                           prompt="请输入用户姓名"
                    <%--设置用户名校验失败后的 无效提示 信息--%>
                           invalidMessage="没有此用户"
                           validType="remote['/newCase/validateName.do?id='+id.value,'name']">
                </td>
            </tr>
            <tr>
                <td>报案人性别:</td>
                <td>
                    <input name="gender" class="easyui-combobox"
                           data-options="panelHeight:'auto',valueField:'value',textField:'label',
                                data:[{
                                    label: '男',
                                    value: '1'
                                },{
                                    label: '女',
                                    value: '0'
                                }]">
                </td>
            </tr>
            <tr>
                <td>联系电话:</td>
                <td>
                    <input name="tel" class="easyui-textbox">
                </td>
            </tr>
            <tr>
                <td>事故时间:</td>
                <td>
                    <input name="time" class="easyui-datebox">
                </td>
            </tr>
            <tr>
                <td>事发地:</td>
                <td>
                    <input name="place" class="easyui-textbox">
                </td>
            </tr>
            <tr>
                <td>保单号:</td>
                <td>
                    <input name="numbering" class="easyui-textbox">
                </td>
            </tr>
            <tr>
                <td>番号:</td>
                <td>
                    <input name="carnumber" class="easyui-textbox">
                </td>
            <tr>
                <td>接待员工:</td>
                <td>
                    <input name="empname" class="easyui-combobox"
                           data-options="panelHeight:'auto',valueField:'username',textField:'username',
                        url:'/employee/selectAll.do'
                        ">
                </td>
            </tr>
            </tr>
        </table>
    </form>
</div>
</body>
</html>
